package com.fst.dsi.lib.domain.entity;

import java.io.Serializable;
import java.lang.String;
import java.sql.Date;
import javax.persistence.*;

import com.dnr.arch.kernel.model.AbstractValue;
import com.dnr.arch.kernel.model.Value;

/**
 * Entity implementation class for Entity: BookOperation
 *
 */
@Entity
@Table(name="bookoperation")
public class BookOperation extends AbstractValue implements Serializable, Value {

	@Id
	@Column(name="id_", unique=true, nullable=false)  
	private long id;
	
	@Column(name="startdate_", nullable=false) 
	private Date startDate;
	
	@Column(name="returndate_", nullable=false) 
	private Date returnDate;
	
	@Column(name="status_", nullable=false) 
	private String status;
	
	@Column(name="realReturnDate_", nullable=true) 
	private Date realReturnDate;
	
	//bi-directional many-to-one association to Student
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="studentid_", nullable=false)
	private Student student;
	
	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	//bi-directional many-to-one association to Author
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="bookid_", nullable=false)
	private Book book;
	
	public Book getBook() {
		return book;
	}

	public void setBook(Book book) {
		this.book = book;
	}

	private static final long serialVersionUID = 1L;	
	public BookOperation() {
		super();
	} 
	   
	public long getId() {
 		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}
	   
	public Date getStartDate() {
 		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	   
	public Date getReturnDate() {
 		return this.returnDate;
	}

	public void setReturnDate(Date returnDate) {
		this.returnDate = returnDate;
	}
	   
	public String getStatus() {
 		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	   
	public Date getRealReturnDate() {
 		return this.realReturnDate;
	}

	public void setRealReturnDate(Date realReturnDate) {
		this.realReturnDate = realReturnDate;
	}
	
   
}
